import hasRole from "./permission/hasRole";
import hasPermi from "./permission/hasPermi";
import postTheme from "./postTheme";
import drag from "./drag";

const install = function permiFun(Vue) {
  Vue.directive("hasRole", hasRole);
  Vue.directive("hasPermi", hasPermi);
  Vue.directive("postTheme", postTheme);
  Vue.directive("drag", drag);
};

if (window.Vue) {
  window.hasRole = hasRole;
  window.hasPermi = hasPermi;
  Vue.use(install); // eslint-disable-line
}

export default install;